In this file, the goal is to quantify the historical cloud cover and wind speeds in the planned flight boxes and to assess the implications for BioSCape operations.
To assess potential cloud cover during the BioSCape campaign, here we use cloud cover data from the MODIS aqua (https://developers.google.com/earth-engine/datasets/catalog/MODIS_061_MOD09GA) and terra (https://developers.google.com/earth-engine/datasets/catalog/MODIS_061_MOD09GA) daily surface reflectance products with a 1km resolution. The QA metadata for these products assigns each raster cell one of 4 cloud categories: Clear, Cloudy, Mixed, or “Not set, assumed clear”. Here, we consider any raster cell categorized as “cloudy” to be cloud covered and other categories to be cloud-free (Figure 1). To assess potential wind speeds, we used wind speed data from ERA5. Wind data are hourly and have a 0.25 degree resolution.
Show the code
# Load required packages# Load packageslibrary(rgee)library(targets)library(sf)library(terra)library(raster)library(tidyverse)library(lubridate)library(leaflet)library(ggplot2)library(ggpubr)library(leafem)library(plotly)library(tidyterra)#Load required data# get domain domain <-st_read("data/output/domain.gpkg",quiet =TRUE) domain_sf <- domain# get flight boxes boxes <-st_read("data/flight_planning/v2_20230718_G3_AVIRISNG_PRISM_boxes.gpkg",quiet =TRUE) boxes$id <-1:nrow(boxes) # need a unique ID to make things easier#need to set up an ordered id. upper left to lower right#we'll order by centroid distance relative to the upper left bounding box of the domain boxes %>%st_centroid() -> box_centroids domain%>%st_transform(crs =st_crs(boxes))%>%st_bbox()%>%st_as_sfc() %>%st_cast("POINT") %>%st_as_sf()-> point box_dist <-st_distance(box_centroids, point[4,]) boxes$ordered_id[order(box_dist)] <-1:nrow(boxes) boxes_sf <- boxes# Download table from drive (to see the code underlying this or to update the data, see the file "R/mock_flights_earth_engine.R") cloud_table <-read.csv("data/test_cloud_stats.csv")# modis clouds cloud_table %>%mutate(year =year(date),month =month(date),day =day(date),day_of_year =yday(date)) -> cloud_table#Load era5 wind data era5_wind_table <-readRDS("data/output/era_wind_weighted.RDS")
Show the code
#Load in the correct projection (for some reason this is handled incorrectly otherwise) nasa_proj <-"+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +R=6371007.181 +units=m +no_defs"#Load the example layerslist.files(path ="data/flight_planning/",pattern ="example_cloud_cover",full.names =TRUE) %>%rast() -> cloud_examples# Generate the bounding box used domain_plus_boxes <-st_union(domain_sf%>%st_transform(crs =st_crs(boxes_sf)), boxes_sf) %>%st_bbox() %>%st_as_sfc()crs(cloud_examples) <- nasa_projggplot()+geom_spatraster(data = cloud_examples[[1]])+geom_sf(data = domain)
Figure 1. Binary MODIS cloud data. Clouds are in white, non-clouds in blue.
Figure 1. Binary MODIS cloud data. Clouds are in white, non-clouds in blue.
Cloud Cover and Wind Speed
To visualize spatial patterns of cloud cover and wind speed, we calculated the averages for each raster cell (Figure 2). For cloud cover, to took the mean value across days (October-December) and years (2000-present). For wind speed, we took median values. We also include median wind speed estimates from FEWSNET (https://developers.google.com/earth-engine/datasets/catalog/NASA_FLDAS_NOAH01_C_GL_M_V001), which are monthly estimates at ~11km resolution.